const seq = require('@db/seq');
const { string, integer, boolean } = require('@db/types');

// 系统接口表
const Apis = seq.define('apis', {
    jwtUnless: {
        type: boolean,
        default: true,
        allowNull: true,
        comment: '是否需要token'
    },
    type: {
        type: integer,
        allowNull: false,
        default: 1102,
        comment: 'api类型：1101为目录和菜单 1102为api接口'
    },
    parentId: {
        type: integer,
        allowNull: false,
        default: 0,
        comment: '父目录id'
    },
    url: {
        type: string,
        allowNull: true,
        comment: 'api路径'
    },
    name: {
        type: string,
        allowNull: false,
        comment: 'api名称'
    },
    method: {
        type: string,
        allowNull: true,
        comment: '请求方法'
    }
});


module.exports = {
    Apis
};
